home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 11⁄24⁄89 / 0126-Possible TWindow Bug-Nov89 < prev    next >
Encoding:
Text File  |  1989-11-24  |  1.5 KB  |  50 lines  |  [TEXT/GEOL]

  1. Item    9384696                         24-Nov-89        14:30
  2.  
  3. From:   MADA2                           MacApp Dev Assoc, Curtis Faith
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.         MACAPP.TEST                     MacApp SQA Team
  7.         MACDTS                          Macintosh Developer Tech. Supt.
  8.  
  9. Sub:    Possible TWindow Bug
  10.  
  11. I am not sure whether this is a bug or just a difference in philosphy but:
  12.  
  13. TWindow being a TView should obey the size determiners as much as they might
  14. apply.  Specifically when one specifies SizeFixed as one of the determiners
  15. then the resizeLimits should be set to that size for both minimum and maximum,
  16. thus disabling size changes in that direction.  One might want a window that is
  17. growable only vertically, thus specifiying a horizontal determiner of sizeFixed
  18. should accomplish that.
  19.  
  20. The changes to make this happen are minimal:
  21.  
  22. In TWindow.IRes and TWindow.IWindow declare a variable:
  23.  
  24.     VAR
  25.         theLimits: Rect;
  26.  
  27. replace this line:
  28.  
  29.     SetResizeLimits(gStdWSizeRect.topLeft, gStdWSizeRect.botRight);
  30.  
  31. With the following lines:
  32.  
  33.     theLimits := gStdWSizeRect;
  34.     IF fSizeDeterminer[h] = sizeFixed THEN
  35.         BEGIN
  36.         theLimits.right := fSize.h;
  37.         theLimits.left := fSize.h;
  38.         END;
  39.     IF fSizeDeterminer[v] = sizeFixed THEN
  40.         BEGIN
  41.         theLimits.top := fSize.v;
  42.         theLimits.bottom := fSize.v;
  43.         END;
  44.     SetResizeLimits(theLimits.topLeft, theLimits.botRight);
  45.  
  46. That will do it.
  47.  
  48. - Curtis
  49.  
  50.